<template>
  <ContentWrap>
    <el-row>
      <el-col :span="24">
        <el-descriptions :column="2">
          <el-descriptions-item>
            <template #label>
              <descriptions-item-label label="记录编码" />
            </template>
            {{ data.bizId || '-' }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <descriptions-item-label label="用户昵称" />
            </template>
            {{ data.nickName || '-' }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <descriptions-item-label label="用户ID" />
            </template>
            {{ data.userId || '-' }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <descriptions-item-label label="分销员" />
            </template>
            {{ data.sourceUserName || '-' }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <descriptions-item-label label="分销员编码" />
            </template>
            {{ data.sourceUserId || '-' }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <descriptions-item-label label="订单编号" />
            </template>
            {{ data.bizId || '-' }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <descriptions-item-label label="订单金额" />
            </template>
            {{ data.totalPrice || '-' }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <descriptions-item-label label="订单类型" />
            </template>
            <dict-tag :type="DICT_TYPE.BIZ_TYPE" :value="data.bizType || '-'" />
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <descriptions-item-label label="佣金金额" />
            </template>
            {{ data.price || '-' }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <descriptions-item-label label="结算时间" />
            </template>
            {{ formatDate(data.createTime) || '-' }}
          </el-descriptions-item>
        </el-descriptions>
      </el-col>
    </el-row>
  </ContentWrap>
</template>
<script setup lang="ts">
import { formatDate } from '@/utils/formatTime'
import { DICT_TYPE } from '@/utils/dict'
import { DescriptionsItemLabel } from '@/components/Descriptions/index'
import * as DistributionHistoryApi from '@/api/blind/distributionHistory'

const { data } = defineProps<{ data: DistributionHistoryApi.DistributionHistoryVO }>()
</script>
<style scoped lang="scss">
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
